package es.udima.geo.geoserver.entities;

import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

public class UserAccessResult {

    private UserSession userSession;
    private Set<UserAccessError> accessErrors;

    public UserAccessResult() {
	accessErrors = new HashSet<UserAccessError>();
    }

    public UserSession getUserSession() {
	return userSession;
    }

    public void setUserSession(UserSession userSession) {
	this.userSession = userSession;
    }

    public boolean isAccessSuccessful() {
	return accessErrors.isEmpty();
    }

    public Collection<UserAccessError> getAccessErrors() {
	return accessErrors;
    }

    public void addAccessError(UserAccessError accessError) {
	this.accessErrors.add(accessError);
    }
}
